Class symantec.itools.awt.Wizard
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.Wizard

Object
   |
   +----Component
           |
           +----Container
                   |
                   +----Panel
                           |
                           +----symantec.itools.awt.Wizard

public class Wizard
extends Panel
implements WizardInterface, Serializable
The Wizard component provides services to create wizards. It maintains a list of pages and uses the services of a WizardController to define its behavior.

See Also:
WizardController, SimpleWizardController

Variable Index

 o CANCEL_LABEL
The text used for the Cancel button.
 o CENTER
Constant value indicating a layout centered.
 o FINISH_LABEL
The text used for the Finish button.
 o HELP_LABEL
The text used for the Help button.
 o LEFT
Constant value indicating a layout aligned to the left.
 o NEXT_LABEL
The text used for the Next button.
 o PREVIOUS_LABEL
The text used for the Back button.
 o RIGHT
Constant value indicating a layout aligned to the right.
 o cancelButton
The Cancel button.
 o finishButton
The Finish button.
 o helpButton
The Help button.
 o horizontalLine1
The horizontal line separating the pages from the navigation buttons.
 o newButtonOrder
The button order for all instances of wizards.
 o nextButton
The Next button.
 o panel1
The panel that contains the pages.
 o panel2
The top-level panel below the horizontal line.
 o panel3
The panel that contains the navigation (Back,Next,Finish) buttons.
 o panel4
The panel that contains the Cancel and Help buttons.
 o previousButton
The Back button.

Constructor Index

 o symantec.itools.awt.Wizard()
Constructs a Wizard.

Method Index

 o addActionListener(ActionListener)
Adds the specified action listener to receive action events from the Finish button.
 o addImpl(Component, Object, int)
Adds the specified component to this container at the specified index.
 o addNotify()
Tells this component that it has been added to a container.
 o addPropertyChangeListener(PropertyChangeListener)
Adds a listener for all event changes.
 o addVetoableChangeListener(VetoableChangeListener)
Adds a vetoable listener for all event changes.
 o doCancel()
Performs the actions needed when the Cancel button is pressed.
 o doFinish()
Performs the actions needed when the Finish button is pressed.
 o doHelp()
Performs the actions needed when the Help button is pressed.
 o doLayout()
Handles the laying out of components within this component.
 o getAlternativeButtonOrder()
Get the button order for all instances of Wizard.
 o getButtonsAlignment()
Gets the buttons alignment of the navigation buttons.
 o getCancelButton()
Return the Cancel button component.
 o getComponentAt(int)
Gets the component for the page at the given index.
 o getFinishButton()
Return the Finish button component.
 o getHelpButton()
Return the Help button component.
 o getIgnoreDesignTime()
 o getLayout()
 o getNextButton()
Return the Next button component.
 o getPageCount()
Gets the number of pages in the Wizard.
 o getPageIndex(Component)
Gets the index for a specific page.
 o getPreviousButton()
Return the Previous button component.
 o getSelectedIndex()
Returns the zero-relative index of the currently selected page.
 o getWizardController()
Get the current WizardController.
 o goNext()
Go to the next page.
 o goPrevious()
Go to the previous page.
 o isCombinedButton()
Determines whether there is a combined Next/Finish button.
 o isHelpButtonVisible()
Determines whether the Help button is visible.
 o remove(Component)
Removes the specified component from this container.
 o remove(int)
Removes the component, specified by index, from this container.
 o removeActionListener(ActionListener)
Removes the specified action listener so that it no longer receives action events from the Finish button.
 o removeAllPages()
Removes all pages and their associated components, clearing the Wizard entirely.
 o removeNotify()
Tells this component that it is being removed from a container.
 o removePageAt(int)
Removes a page and its associated component at the given index.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a listener for all event changes.
 o removeVetoableChangeListener(VetoableChangeListener)
Removes a vetoable listener for all event changes.
 o restart()
Restarts the wizard after usage.
 o setAlternativeButtonOrder(boolean)
Set the button order for all instances of Wizard.
 o setBackground(Color)
Sets the background color of this component.
 o setButtonsAlignment(int)
Sets the buttons alignment of the navigation buttons.
 o setCancelEnabled(boolean)
Enables or disables the Cancel button.
 o setCombinedButton(boolean)
Sets a combined Next/Finish button or two buttons depending on the value of the parameter.
 o setComponentAt(int, Component)
Replaces a page at the index specified.
 o setFinishEnabled(boolean)
Enables or disables the Finish button.
 o setFirstPageIndex(int)
Set the wizard starting page.
 o setHelpButtonVisible(boolean)
Shows or hides the Help button depending on the value of the parameter.
 o setHelpEnabled(boolean)
Enables or disables the Help button.
 o setIgnoreDesignTime(boolean)
Tell the wizard to ignore the value of java.beans.Beans.isDesignTime().
 o setLayout(LayoutManager)
Takes no action.
 o setNextEnabled(boolean)
Enables or disables the Next button.
 o setNextPage(Component)
Sets the page to show when goNext is called.
 o setNextPageIndex(int)
Sets the index of the page to show when goNext is called.
 o setPreviousEnabled(boolean)
Enables or disables the Previous button.
 o setPreviousPage(Component)
Sets the page to show when goPrevious is called.
 o setPreviousPageIndex(int)
Sets the index of the page to show when goPrevious is called.
 o setWizardController(WizardController)
Sets a customized WizardController.
 o updateButtonsState()
Sets a default status for the Previous, Next and Finish buttons.

Variables

 o CANCEL_LABEL
protected static java.lang.String CANCEL_LABEL
The text used for the Cancel button.

 o CENTER
public static final int CENTER
Constant value indicating a layout centered.

 o FINISH_LABEL
protected static java.lang.String FINISH_LABEL
The text used for the Finish button.

 o HELP_LABEL
protected static java.lang.String HELP_LABEL
The text used for the Help button.

 o LEFT
public static final int LEFT
Constant value indicating a layout aligned to the left.

 o NEXT_LABEL
protected static java.lang.String NEXT_LABEL
The text used for the Next button.

 o PREVIOUS_LABEL
protected static java.lang.String PREVIOUS_LABEL
The text used for the Back button.

 o RIGHT
public static final int RIGHT
Constant value indicating a layout aligned to the right.

 o cancelButton
protected java.awt.Button cancelButton
The Cancel button.

 o finishButton
protected java.awt.Button finishButton
The Finish button.

 o helpButton
protected java.awt.Button helpButton
The Help button.

 o horizontalLine1
protected symantec.itools.awt.shape.HorizontalLine horizontalLine1
The horizontal line separating the pages from the navigation buttons.

 o newButtonOrder
protected static boolean newButtonOrder
The button order for all instances of wizards.

 o nextButton
protected java.awt.Button nextButton
The Next button.

 o panel1
protected java.awt.Panel panel1
The panel that contains the pages.

 o panel2
protected java.awt.Panel panel2
The top-level panel below the horizontal line.

 o panel3
protected java.awt.Panel panel3
The panel that contains the navigation (Back,Next,Finish) buttons.

 o panel4
protected java.awt.Panel panel4
The panel that contains the Cancel and Help buttons.

 o previousButton
protected java.awt.Button previousButton
The Back button.

Constructors

 o Wizard
public Wizard()
Constructs a Wizard.

Methods

 o addActionListener
public void addActionListener(ActionListener l)
Adds the specified action listener to receive action events from the Finish button.

See Also:
removeActionListener
 o addImpl
protected void addImpl(Component comp,
                       Object constraints,
                       int index)
Adds the specified component to this container at the specified index. This method also notifies the layout manager to add the component to this container's layout using the specified constraints object.

This is the method to override if a program needs to track every add request to a container. An overriding method should usually include a call to the superclass's version of the method:

super.addImpl(comp, constraints, index)

Parameters:
comp - the component to be added.
constraints - an object expressing layout contraints for this component.
index - the position in the container's list at which to insert the component, where -1 means insert at the end.
Overrides:
addImpl in class Container
Since:
JDK1.1
See Also:
add(java.awt.Component), add(java.awt.Component, int), add(java.awt.Component, java.lang.Object), LayoutManager
 o addNotify
public void addNotify()
Tells this component that it has been added to a container. This is a standard Java AWT method which gets called by the AWT when this component is added to a container. Typically, it is used to create this component's peer. It has been overridden here to hook-up event listeners.

Overrides:
addNotify in class Panel
See Also:
removeNotify
 o addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener for all event changes.

Parameters:
listener - the listener to add.
See Also:
removePropertyChangeListener
 o addVetoableChangeListener
public void addVetoableChangeListener(VetoableChangeListener listener)
Adds a vetoable listener for all event changes.

Parameters:
listener - the listener to add.
See Also:
removeVetoableChangeListener
 o doCancel
public void doCancel()
Performs the actions needed when the Cancel button is pressed.

See Also:
doFinish, doHelp
 o doFinish
public void doFinish()
Performs the actions needed when the Finish button is pressed.

See Also:
doCancel, doHelp
 o doHelp
public void doHelp()
Performs the actions needed when the Help button is pressed.

See Also:
doFinish, doCancel
 o doLayout
public void doLayout()
Handles the laying out of components within this component. This is a standard Java AWT method which gets called by the AWT when this component is validated with the validate() method.

Overrides:
doLayout in class Container
See Also:
validate
 o getAlternativeButtonOrder
public static boolean getAlternativeButtonOrder()
Get the button order for all instances of Wizard.

 o getButtonsAlignment
public int getButtonsAlignment()
Gets the buttons alignment of the navigation buttons.

See Also:
setButtonsAlignment
 o getCancelButton
public java.awt.Button getCancelButton()
Return the Cancel button component.

 o getComponentAt
public java.awt.Component getComponentAt(int index)
Gets the component for the page at the given index.

Parameters:
index - zero-relative index of the page
Returns:
returns the component associated with the page
Throws: ArrayIndexOutOfBoundsException
if the index is invalid
See Also:
setComponentAt
 o getFinishButton
public java.awt.Button getFinishButton()
Return the Finish button component.

 o getHelpButton
public java.awt.Button getHelpButton()
Return the Help button component.

 o getIgnoreDesignTime
public boolean getIgnoreDesignTime()
 o getLayout
public java.awt.LayoutManager getLayout()
Overrides:
getLayout in class Container
 o getNextButton
public java.awt.Button getNextButton()
Return the Next button component.

 o getPageCount
public int getPageCount()
Gets the number of pages in the Wizard.

Returns:
the number of pages currently in the Wizard
 o getPageIndex
public int getPageIndex(Component comp)
Gets the index for a specific page.

Parameters:
comp - the page to get the index of
Returns:
the zero-relative index of the page or -1 if it is not found
Throws: IllegalArgumentException
if the component is null
 o getPreviousButton
public java.awt.Button getPreviousButton()
Return the Previous button component.

 o getSelectedIndex
public int getSelectedIndex()
Returns the zero-relative index of the currently selected page.

Returns:
the currently selected page or -1 if none are shown
 o getWizardController
public symantec.itools.awt.WizardController getWizardController()
Get the current WizardController.

See Also:
setWizardController
 o goNext
public void goNext()
Go to the next page. If a page has been selected with setNextPage it will be used. If a page index has been selected with setNextPageIndex it will be used unless a page has been specified. The chain information will be reset.

See Also:
goPrevious, setNextPage, setNextPageIndex
 o goPrevious
public void goPrevious()
Go to the previous page. If a page has been selected with setPreviousPage it will be used. If a page index has been selected with setPreviousPageIndex it will be used unless a page has been specified. The chain information will be reset.

See Also:
goNext, setPreviousPage, setPreviousPageIndex
 o isCombinedButton
public boolean isCombinedButton()
Determines whether there is a combined Next/Finish button.

See Also:
setCombinedButton
 o isHelpButtonVisible
public boolean isHelpButtonVisible()
Determines whether the Help button is visible.

See Also:
setHelpButtonVisible
 o remove
public void remove(Component comp)
Removes the specified component from this container. This is a standard Java AWT method which gets called to remove a component from a container. When this happens the component's removeNotify() will also get called to indicate component removal.

Parameters:
comp - the component to remove
Overrides:
remove in class Container
See Also:
add
 o remove
public void remove(int index)
Removes the component, specified by index, from this container. This is a standard Java AWT method which gets called to remove a component from a container. When this happens the component's removeNotify() will also get called to indicate component removal.

Parameters:
comp - the component to remove
Overrides:
remove in class Container
See Also:
add
 o removeActionListener
public void removeActionListener(ActionListener l)
Removes the specified action listener so that it no longer receives action events from the Finish button.

See Also:
addActionListener
 o removeAllPages
public void removeAllPages()
Removes all pages and their associated components, clearing the Wizard entirely.

 o removeNotify
public void removeNotify()
Tells this component that it is being removed from a container. This is a standard Java AWT method which gets called by the AWT when this component is removed from a container. Typically, it is used to destroy the peers of this component and all its subcomponents. It has been overridden here to unhook event listeners.

Overrides:
removeNotify in class Container
See Also:
addNotify
 o removePageAt
public void removePageAt(int index)
Removes a page and its associated component at the given index. The currently active page cannot be removed.

Parameters:
index - zero-relative index of the page
Throws: ArrayIndexOutOfBoundsException
if the index is invalid
 o removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Removes a listener for all event changes.

Parameters:
listener - the listener to remove.
See Also:
addPropertyChangeListener
 o removeVetoableChangeListener
public void removeVetoableChangeListener(VetoableChangeListener listener)
Removes a vetoable listener for all event changes.

Parameters:
listener - the listener to remove.
See Also:
addVetoableChangeListener
 o restart
public void restart()
Restarts the wizard after usage. The WizardController life cycle will be reset and the first page will be shown again.

 o setAlternativeButtonOrder
public static void setAlternativeButtonOrder(boolean order)
Set the button order for all instances of Wizard. This should be called before instanciating a Wizard.

 o setBackground
public void setBackground(Color color)
Sets the background color of this component.

Overrides:
setBackground in class Component
 o setButtonsAlignment
public void setButtonsAlignment(int align) throws PropertyVetoException
Sets the buttons alignment of the navigation buttons.

Parameters:
align - Wizard.LEFT, Wizard.CENTER or Wizard.RIGHT
Throws: PropertyVetoException
if the specified property value is unacceptable
Throws: IllegalArgumentException
if the parameter is invalid
See Also:
getButtonsAlignment
 o setCancelEnabled
public void setCancelEnabled(boolean status)
Enables or disables the Cancel button.

Parameters:
status - true to enable the button
See Also:
setPreviousEnabled, setNextEnabled, setFinishEnabled, setHelpEnabled
 o setCombinedButton
public void setCombinedButton(boolean combined) throws PropertyVetoException
Sets a combined Next/Finish button or two buttons depending on the value of the parameter.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isCombinedButton
 o setComponentAt
public void setComponentAt(int index,
                           Component comp) throws PropertyVetoException
Replaces a page at the index specified.

Parameters:
index - the zero-relative index of the page to change
comp - the new component
Throws: PropertyVetoException
if the specified property value is unacceptable
Throws: ArrayIndexOutOfBoundsException
if the index is invalid
Throws: IllegalArgumentException
if the component is null
See Also:
getComponentAt
 o setFinishEnabled
public void setFinishEnabled(boolean status)
Enables or disables the Finish button.

Parameters:
status - true to enable the button
See Also:
setPreviousEnabled, setNextEnabled, setCancelEnabled, setHelpEnabled
 o setFirstPageIndex
public void setFirstPageIndex(int index)
Set the wizard starting page. This has to be called before any page is added.

 o setHelpButtonVisible
public void setHelpButtonVisible(boolean visible) throws PropertyVetoException
Shows or hides the Help button depending on the value of the parameter.

Throws: PropertyVetoException
if the specified property value is unacceptable
See Also:
isHelpButtonVisible
 o setHelpEnabled
public void setHelpEnabled(boolean status)
Enables or disables the Help button.

Parameters:
status - true to enable the button
See Also:
setPreviousEnabled, setNextEnabled, setFinishEnabled, setCancelEnabled
 o setIgnoreDesignTime
public void setIgnoreDesignTime(boolean ignore)
Tell the wizard to ignore the value of java.beans.Beans.isDesignTime().

 o setLayout
public void setLayout(LayoutManager mgr)
Takes no action. This is a standard Java AWT method which gets called to specify which layout manager should be used to layout the components in standard containers. Since layout managers CANNOT BE USED with this container the standard setLayout has been OVERRIDDEN for this container and does nothing.

Parameters:
mgr - the layout manager to use to layout this container's components (IGNORED)
Overrides:
setLayout in class Container
See Also:
getLayout
 o setNextEnabled
public void setNextEnabled(boolean status)
Enables or disables the Next button.

Parameters:
status - true to enable the button
See Also:
setPreviousEnabled, setFinishEnabled, setCancelEnabled, setHelpEnabled
 o setNextPage
public void setNextPage(Component comp)
Sets the page to show when goNext is called.

See Also:
setPreviousPageIndex, goNext, WizardController, SimpleWizardController
 o setNextPageIndex
public void setNextPageIndex(int index)
Sets the index of the page to show when goNext is called.

See Also:
setPreviousPageIndex, goNext, WizardController, SimpleWizardController
 o setPreviousEnabled
public void setPreviousEnabled(boolean status)
Enables or disables the Previous button.

Parameters:
status - true to enable the button
See Also:
setNextEnabled, setFinishEnabled, setCancelEnabled, setHelpEnabled
 o setPreviousPage
public void setPreviousPage(Component comp)
Sets the page to show when goPrevious is called.

See Also:
setNextPageIndex, goPrevious, WizardController, SimpleWizardController
 o setPreviousPageIndex
public void setPreviousPageIndex(int index)
Sets the index of the page to show when goPrevious is called.

See Also:
setNextPageIndex, goPrevious, WizardController, SimpleWizardController
 o setWizardController
public void setWizardController(WizardController controller)
Sets a customized WizardController. This should be done once before actually using the Wizard and after all pages have been added. If no customized WizardController is set, a default SimpleWizardController is used.

See Also:
getWizardController
 o updateButtonsState
public void updateButtonsState()
Sets a default status for the Previous, Next and Finish buttons.

See Also:
setPreviousEnabled, setNextEnabled, setFinishEnabled, setCancelEnabled, setHelpEnabled

All Packages  Class Hierarchy  This Package  Previous  Next  Index